Fix: ConcurrentModificationException in SeaCreatureManager #2350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Fix a ConcurrentModificationException in SeaCreatureManager.
Reported: https://discord.com/channels/997079228510117908/1273199562558935081
Stack Trace
SkyHanni 0.26.Beta.22: Caught an NoSuchElementException in FishingTimer at SeaCreatureFishEvent: null
Caused by java.util.NoSuchElementException: null
at com.google.common.cache.LocalCache$HashIterator.nextEntry(LocalCache.java:4343)
at com.google.common.cache.LocalCache$KeyIterator.next(LocalCache.java:4362)
at kotlin.collections.CollectionsKt___CollectionsKt.toSet(_Collections.kt:1347)
at SH.utils.TimeLimitedSet.toSet(TimeLimitedSet.kt:31)
at SH.utils.TimeLimitedSet.iterator(TimeLimitedSet.kt:34)
at SH.features.fishing.FishingTimer.handle(FishingTimer.kt:245)
at SH.features.fishing.FishingTimer.onSeaCreatureFish(FishingTimer.kt:122)
at SH.features.fishing.SeaCreatureManager.onChat(SeaCreatureManager.kt:53)
at SH.data.ChatManager.onChatReceive(ChatManager.kt:130)
at FML.common.eventhandler.EventBus.post(EventBus.java:140)
Changelog Fixes